import mongoose from 'mongoose'
// 生成Schema模型
const Schema = mongoose.Schema
const visit = new Schema({
  visitTime: {
    type: Date,
    default: Date.now
  },
  name: {
    type: String,
    require: true
  },
  tel: {
    type: String,
    require: true
  },
  matter: {
    type: String
  },
  tower: {
    type: String,
    required: true
  },
  dorm: {
    type: String
  },
  visitedName: {
    type: String
  },
  watch: {
    type: String,
    required: true
  },
  remake: {
    type: String,
    default: ''
  },
  leaveTime: {
    type: Date,
    default: ''
  }
})

export default mongoose.model('Visit', visit, 'visit')
